package util;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;

/**
 * Created by lenovo on 2017/1/20.
 */
public class GetPropertiesFile {


    public static Properties getPropertiesFile() {
        Properties prop = new Properties();
        Map<String,String> map = new HashMap<String, String>();
        try {
            System.out.println(System.getProperty("user.dir"));
            //读取属性文件a.properties
            InputStream in = new BufferedInputStream(new FileInputStream(System.getProperty("user.dir") + "\\src\\main\\resources\\properties\\jspFileName.properties"));
            prop.load(in);     ///加载属性列表

        } catch (Exception e) {
            e.printStackTrace();
        }
        return prop;
    }

}
